<template>
	<view class="con-box">
		<view class="backImg">
			<view @tap="back" class="backImg-left">
				<image src="../../static/detail/back.png" mode="widthFix"></image>
			</view>
			<view>我的积分</view>
			<view class="backImg-right"></view>
		</view>
		
		<view class="info-card">
			<view class="totalAssets">账户余额</view>
			<view class="money">{{totalMoney.toFixed(2)}}</view>
		</view>
		<view class="tab-list" v-show="integralList.length > 0">
			<view class="list-item head">
				<view>收支明细</view>
			</view>
			<view class="list-item" v-for="(item,index) in integralList" :key="index">
				<view class="info">
					<view class="title">{{item.title}}</view>
					<text>2022-04-20 12:31:30</text>
				</view>
				<view class="number">+500</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				totalMoney:0,
				integralList:[]
			}
		},
		methods:{
			back(){
				uni.switchTab({
					url:'/pages/user/user'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.con-box {
		min-height: 100vh;
		padding: 150upx 40upx 0;
	
		.backImg {
			width: 100%;
			position: fixed;
			top: 0;
			left: 0;
			z-index: 99;
			padding: 40upx;
			display: flex;
			justify-content: space-between;
			color: #FFFFFF;
	
			.backImg-left {
				display: flex;
				align-items: center;
	
				image {
					width: 20upx;
					height: 45upx;
				}
			}
	
			.backImg-right {
				display: flex;
				justify-content: flex-end;
				align-items: center;
	
				image {
					width: 44upx;
					height: 36upx;
					margin-left: 10upx;
				}
	
				.share {
					width: 36upx;
					height: 36upx;
				}
			}
		}
		
		.info-card{
			width: 100%;
			background: url(../../static/user/integral.png) no-repeat center center;
			background-size: 100% 100%;
			padding:0 60upx;
			padding-top: 58upx;
			padding-bottom: 54upx;
			color: #FFF;
			.totalAssets{
				font-size: 28upx;
				line-height: 28upx;
				font-weight: bold;
				text-align: left;
			}
			.money{
				font-family: Arial;
				font-weight: bold;
				width: 100%;
				text-align: left;
				font-size: 72upx;
				line-height: 72upx;
				margin-top: 36upx;
			}
		}
		
		.tab-list{
			background: #2C2A2A;
			border-radius: 10upx;
			margin-top: 30upx;
			padding: 0 30upx;
			.list-item{
				display: flex;
				align-items: center;
				justify-content: space-between;
				height: 150upx;
				font-size: 28upx;
				color: #FFF;
				.info{
					.title{
						font-size: 26upx;
						line-height: 26upx;
						margin-bottom: 20upx;
					}
					text{
						font-size: 22upx;
						line-height: 22upx;
						color: rgba($color: #fff, $alpha: 0.8);
					}
					.number{
						font-size: 30upx;
						font-weight: bold;
					}
				}
			}
			.head{
				height: 90upx;
				border-bottom: 1px solid rgba($color: #000, $alpha: 0.1);
			}
		}
		
	}
</style>
